DrawUnicodeString.[hc] provides unicode text drawing routines layered on top of the ATSUI text routines that can be used for drawing Unicode strings.
Advantages of using these libraries:
unicode text drawing
drawing text using postscript fonts.
Performance Tips:
(A) Creating ATSUI style records takes time.
If at all possible, do not call the routine MakeThemeATSUIStyle or the routine MakeSimpleATSUIStyle more than once to create the styles your application requires. cache the style records created among your application's globals and use them whenever you need to draw text.
(B) Calculating wordbreaks and wrapping text takes time.
The routines RenderUnicodeString, MeasureUnicodeString, RenderCFString, and MeasureCFString include a maxwidth parameter. Set maxwidth to zero if you know all your text should reside on one line. If you look at the source you will notice that when this parameter is non-zero, a separate code path is used that attempts to calculate line breaks at the indicated width. This takes extra time to do. If you know there are no line breaks, don't ask for them to be calculated.